#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int differenceOfSum(vector<int>& nums) {
        int sum = 0;
        int sum2 = 0;
        for (auto e : nums)
            sum += e;
        for (auto n : nums)
        {
            for (auto s : to_string(n))
                sum2 += (s - '0');
        }
        return abs(sum - sum2);
    }
};